<template>
    <div class="man-con">
         <headNav title="选择教师"></headNav>
        <select-teacher
        @comfirm="comfirm"
     
        ></select-teacher>
    </div>
</template>
<script>
import selectTeacher from '@/components/selectTeacher'
import headNav from '@/components/headNav/headNav';
export default {
    name: 'man',
     components: {
       selectTeacher, headNav
    },
    computed: {
        teacherList () {
            return this.$store.state.selectTeacher.teacherList
        }
    },
    data () {
        return {
           selectedMan: []
        }
    },
    methods: {
        comfirm (data) {
            this.$store.state.email.selectedMan = [].concat(this.teacherList)
            this.$store.state.selectTeacher.teacherList = []
            this.$router.go(-1)
        }
    },
    created () {
        this.setTitle('选择教师')
    },
    mounted () {
        this.$store.state.selectTeacher.teacherList = this.$store.state.email.selectedMan
    }    
}
</script>
<style scoped>

</style>
